/*
 * @Description: Collections
 * @Author: rendc
 * @Date: 2025-08-14 14:12:33
 * @LastEditors: rendc
 * @LastEditTime: 2025-08-14 14:33:52
 */

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class TestCollections {

  public static void main(String[] args) {
    // Collections 集合工具类
    // Collections 没有继承 没有实现 父类是Object
    // Arrays
    List<Integer> list = new ArrayList<>();
    list.add(1);
    list.add(2);
    list.add(3);
    list.add(1);
    // System.out.println(list);
    // Collections.fill(list, null);
    // System.out.println(Collections.max(list));
    // System.out.println(Collections.min(list));
    System.out.println(list);
    Collections.reverse(list);
    System.out.println(list);
    Collections.sort(list);
    System.out.println(list);
    Collections.shuffle(list);
    System.out.println(list);
    Collections.addAll(list, 1, 3, 5, 7);
    Collections.addAll(list, 1, 3);
    System.out.println(list);
  }

}